package com.chezai.client.dao;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

/**
 * 数据库升级合并辅助类
 * Created by likunyang on 2017/5/22.
 */

public class MigrationOpenHelper extends DaoMaster.OpenHelper {
    public MigrationOpenHelper(Context context, String name) {
        super(context, name);
    }

    public MigrationOpenHelper(Context context, String name, SQLiteDatabase.CursorFactory factory) {
        super(context, name, factory);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
        super.onUpgrade(db, oldVersion, newVersion);
//        MigrationHelper.migrate(db, ClassRecordDao.class);
//        MigrationHelper.migrate(db, CoachLoginRecordDao.class);
//        MigrationHelper.migrate(db, PeriodRecordDao.class);
//        MigrationHelper.migrate(db, StudentStudyRecordDao.class);
//        MigrationHelper.migrate(db, TerminalBaseInfoDao.class);
        MigrationHelper.migrate(db, RandomPhotoDao.class);
//        MigrationHelper.migrate(db, TerminalParameterDao.class);
//        MigrationHelper.migrate(db, UserInfoDao.class);
    }
}
